Skip to content

fix(create-frontend): pin jQuery to 3.7.1 for basercms4 projects#901

Open
teppei-d wants to merge 2 commits into
d-zero-dev:devfrom
teppei-d:fix/pin-jquery-to-v3
Open

fix(create-frontend): pin jQuery to 3.7.1 for basercms4 projects#901
teppei-d wants to merge 2 commits into
d-zero-dev:devfrom
teppei-d:fix/pin-jquery-to-v3

Conversation

@teppei-d

@teppei-d teppei-d commented May 29, 2026

Copy link
Copy Markdown
Collaborator

背景

plopfile.jsjquery: 'latest' と指定していたため、2026年1月リリースの jQuery 4.0.0 が取得されていた。
colorbox が jQuery 4系と互換性がないため、スライドショーなどが動作しない状態になっていた(jQuery 4.0 Upgrade Guide)。

変更内容

  • pkg.dependencies['jquery'] = 'latest''3.7.1' に固定(jQuery 3系最新版)
  • 回帰防止のため、basercms4 生成時に jquery3.7.1 であることを検証するテストを追加

動作確認

jQuery 3.7.1 を適用した環境で、動作しなくなっていたスライドショーが正常に動作することを確認済み。

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
yusasa16
yusasa16 previously approved these changes May 29, 2026
delete pkg.devDependencies['@burger-editor/local'];
pkg.dependencies['@burger-editor/css'] = '2';
pkg.dependencies['jquery'] = 'latest';
pkg.dependencies['jquery'] = '3.7.1'; // jQuery 4系で削除されたAPIとの互換性のため3系の最新版を利用

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.7.1 に固定しなければいけない理由をもう少し具体的にコメントで残したほうがいいかなと思いました!
互換性がないコードは isFunction() だけでしょうか?
それらの互換性がない関数はどのファイルが実行していますか?colorbox?だけ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arktds
はい。デモページでエラーになっていたのはisFunction()だけでした。 原因は bge_functions.min.js → jquery.colorbox-min.js の流れで、colorbox が jQuery 4.0 で削除された$.isFunction()に依存しているためです。
以下のようにコメントを修正予定ですがいかがでしょうか?
// colorbox が jQuery 4.0 で削除された $.isFunction() に依存するため 3.x 最新版(3.7.1)に固定

スクリーンショット 2026-05-29 20 10 52

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@teppei-d
colorbox は isFunction() 以外にも互換性がなくなった関数を使用しているようです。
今回はたまたま isFunction() だけ使用していたか、isFunction() のエラーを回避しても次に別のエラーが出る可能性もありそうです。
したがって、やはり isFunction() という関数名は明記せず、「colorbox」というパッケージ名だけは明記したほうが良さそうです!
例えば、次のようなニュアンスだと良いかなと思います!
// colorbox が jQuery 4系と互換性がないため、3系の最新版に固定

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arktds
ご指摘ありがとうございます!「colorbox」というパッケージ名を明記するコメントに変更しております。
お手隙の際に、ご確認よろしくお願いいたします!

YusukeHirao
YusukeHirao previously approved these changes May 29, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@teppei-d teppei-d dismissed stale reviews from YusukeHirao and yusasa16 via 36a7ee4 June 2, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants